package com.pk.flink.functions.source;

import com.pk.flink.bean.Access;
import org.apache.flink.api.common.functions.MapFunction;

public class AccecssMapFunction implements MapFunction<String,Access> {
    @Override
    public Access map(String str) throws Exception {

        String[] splits = str.split(",");
        Access access = new Access(Long.parseLong(splits[0]), splits[1], Double.parseDouble(splits[2]));
        return access;
    }
}
